# Contributor: Noel Kuntze <noel.kuntze@thermi.consulting>
# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
pkgname=py3-cerberus
pkgver=1.3.4
pkgrel=1
pkgdesc="Lightweight, extensible data validation library for Python"
url="http://python-cerberus.org/"
license="ISC"
arch="noarch"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/pyeve/cerberus/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/cerberus-$pkgver"

build() {
	python3 setup.py build
}

check() {
	py.test-3 -v cerberus/tests
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
	# Don't package the tests or benchmarks
	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/cerberus/tests
	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/cerberus/benchmarks
}

sha512sums="
c816b426ed1b32367d1e8f1c26d6ddd4b49c6578540e688baf693e3094a05800f645cfe879be6378c1e9be9899cad7bc2ad1ed9844d6762d2ef6e0cc54a7476a  py3-cerberus-1.3.4.tar.gz
"
